package book;

public class BookList {
    private Book[] book = new Book[10];
    private int useSize;
    public BookList() {
        //方便对Book类进行初始化
        this.book[0] = new Book("三体","刘慈欣",30,"科幻小说");
        this.book[1] = new Book("吹响吧！上低音号","武田绫乃",200,"轻小说");
        this.book[2] = new Book("野草","鲁迅",30,"散文");

        this.useSize = 3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

//
    public Book getBook(int pos) {
        return book[pos];
    }

    public void setBookList(int pos,Book book) {
        this.book[pos] = book;
    }


    //返回Book类型的类，与上面的方法构成重载
    public Book[] getBook() {
        return book;
    }
}
